(global.webpackJsonp = global.webpackJsonp || []).push([
  ["pages/app_admin/goods/goods"], {
    "0633": function (t, e, n) {
      var i = function () {
          var t = this;
          t.$createElement;
          t._self._c, t._isMounted || (t.e0 = function (e) {
            t.id = null
          }, t.e1 = function (e) {
            t.getFocus = !0
          }, t.e2 = function (e) {
            t.id = null
          })
        },
        o = [];
      n.d(e, "a", function () {
        return i
      }), n.d(e, "b", function () {
        return o
      })
    },
    "117b": function (t, e, n) {
      var i = n("7070");
      n.n(i).a
    },
    "2d6c": function (t, e, n) {
      (function (t) {
        function i(t, e) {
          var n = Object.keys(t);
          if (Object.getOwnPropertySymbols) {
            var i = Object.getOwnPropertySymbols(t);
            e && (i = i.filter(function (e) {
              return Object.getOwnPropertyDescriptor(t, e).enumerable
            })), n.push.apply(n, i)
          }
          return n
        }

        function o(t, e, n) {
          return e in t ? Object.defineProperty(t, e, {
            value: n,
            enumerable: !0,
            configurable: !0,
            writable: !0
          }) : t[e] = n, t
        }
        Object.defineProperty(e, "__esModule", {
          value: !0
        }), e.default = void 0;
        var a = {
          data: function () {
            return {
              tabList: [{
                id: 1,
                name: "出售中"
              }, {
                id: 0,
                name: "下架中"
              }],
              activeTab: "1",
              getFocus: !1,
              keyword: "",
              page: 1,
              id: null,
              more_list: !1,
              iphone_x: !1,
              status: null,
              page_loading: !0,
              list: [],
              is_switch: !1,
              is_delete: !1,
              toSearch: !1,
              device: null,
              first: !1
            }
          },
          components: {
            "app-tab-nav": function () {
              return n.e("components/basic-component/app-tab-nav/app-tab-nav").then(n.bind(null, "7fd0"))
            }
          },
          computed: function (t) {
            for (var e = 1; e < arguments.length; e++) {
              var n = null != arguments[e] ? arguments[e] : {};
              e % 2 ? i(n, !0).forEach(function (e) {
                o(t, e, n[e])
              }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : i(n).forEach(function (e) {
                Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e))
              })
            }
            return t
          }({}, (0, n("2f62").mapState)({
            theme: function (t) {
              return t.mallConfig.theme
            },
            userInfo: function (t) {
              return t.user.info
            },
            appImg: function (t) {
              return t.mallConfig.__wxapp_img.mall
            },
            appSetting: function (t) {
              return t.mallConfig.mall.setting
            },
            adminImg: function (t) {
              return t.mallConfig.__wxapp_img.app_admin
            }
          })),
          methods: {
            clearSearch: function () {
              this.keyword = "", this.reload()
            },
            toAdd: function () {
              t.navigateTo({
                url: "/pages/app_admin/add-goods/add-goods"
              })
            },
            toDetail: function (id) {
              console.log("id = " + id)
              t.navigateTo({
                url: "/pages/app_admin/detail-goods/detail-goods?id="+id
              })
            },
            toRedirect: function (e) {
              t.redirectTo({
                url: e
              })
            },
            beSearch: function () {
              this.getFocus = !1, 0 == this.keyword.length ? this.toSearch = !this.toSearch : this.toSearch = this.toSearch
            },
            reload: function () {
              this.list = [], this.page = 1, this.id = null, this.getList()
            },
            cancel: function () {
              this.id = null, this.is_delete = !1, this.is_switch = !1
            },
            toDelete: function (t) {
              this.is_delete = !0
            },
            showMenu: function (t) {
              this.id == t ? this.id = null : this.id = t
            },
            toSwitch: function (t, e) {
              var n = this;
              n.id = e, n.status = t, n.is_switch = !0
            },
            tabStatus: function (e) {
              this.list = [], this.page = 1, this.activeTab = e.currentTarget.dataset.id, t.showLoading({
                title: "加载中..."
              }), this.getList()
            },
            getList: function () {
              var e = this,
                n = {
                  keyword: e.keyword
                };
              n.status = e.activeTab, e.$request({
                url: e.$api.app_admin.goods,
                data: {
                  page: e.page,
                  search: JSON.stringify(n)
                }
              }).then(function (n) {
                t.hideLoading(), e.$hideLoading(), 0 == n.code ? (e.list = e.list.concat(n.data.list), e.page++, e.more_list = !1, e.first = !0, n.data.list.length == n.data.pagination.pageSize && (e.more_list = !0)) : t.showToast({
                  title: n.msg,
                  icon: "none",
                  duration: 1e3
                })
              }).catch(function (n) {
                t.hideLoading(), e.$hideLoading()
              })
            },
            goods_destroy: function () {
              var e = this;
              t.showLoading({
                title: "加载中..."
              }), e.$request({
                url: e.$api.app_admin.goods_destroy,
                data: {
                  id: e.id
                },
                method: "post"
              }).then(function (n) {
                t.hideLoading(), 0 == n.code ? (e.page = 1, e.list = [], e.id = null, e.is_delete = !1, e.getList()) : t.showToast({
                  title: n.msg,
                  icon: "none",
                  duration: 1e3
                })
              }).catch(function (e) {
                t.hideLoading()
              })
            },
            goods_switch: function () {
              var e = this;
              e.$request({
                url: e.$api.app_admin.goods_switch,
                data: {
                  status: e.status,
                  id: e.id
                },
                method: "post"
              }).then(function (n) {
                0 == n.code ? (e.page = 1, e.id = null, e.list = [], e.is_switch = !1, e.getList()) : t.showToast({
                  title: n.msg,
                  icon: "none",
                  duration: 1e3
                })
              }).catch(function (t) {})
            }
          },
          onLoad: function () {
            var e = this;
            t.getSystemInfo({
              success: function (t) {
                (t.model.indexOf("iPhone X") > -1 || t.model.indexOf("iPhone 11") > -1 || t.model.indexOf("iPhone11") > -1 || t.model.indexOf("iPhone12") > -1 || t.model.indexOf("Unknown Device") > -1) && (e.iphone_x = !0)
              }
            }), this.activeTab = "1", this.$showLoading({
              type: "global",
              text: "加载中..."
            }), this.getList()
          },
          onReachBottom: function () {
            this.more_list && this.getList()
          },
          onShow: function (t) {
            var e = this;
            e.first && (e.list = [], e.page = 1, e.getList())
          }
        };
        e.default = a
      }).call(this, n("543d").default)
    },
    7070: function (t, e, n) {},
    bda9: function (t, e, n) {
      n.r(e);
      var i = n("2d6c"),
        o = n.n(i);
      for (var a in i) "default" !== a && function (t) {
        n.d(e, t, function () {
          return i[t]
        })
      }(a);
      e.default = o.a
    },
    d2c1: function (t, e, n) {
      n.r(e);
      var i = n("0633"),
        o = n("bda9");
      for (var a in o) "default" !== a && function (t) {
        n.d(e, t, function () {
          return o[t]
        })
      }(a);
      n("117b");
      var s = n("2877"),
        r = Object(s.a)(o.default, i.a, i.b, !1, null, "4470ff62", null);
      e.default = r.exports
    }
  },
  [
    ["2a24", "common/runtime", "common/vendor"]
  ]
]);